package com.liaoye.hellocustomview.util;

import android.content.res.Resources;
import android.util.Log;

public class DPUtil {
    public static float dpToPix(float dp){
        Log.i("DPUtil", "dpToPix: " + Resources.getSystem().getDisplayMetrics().toString());
        return Resources.getSystem().getDisplayMetrics().density * dp;
    }
}
